#ifndef FKFILESENDER_H
#define FKFILESENDER_H

#include "FKFileManager.h"

#include <QMap>
#include <QVariant>

class FKClient;
class QFile;

class FKFileSender:public FKFileManager{
    Q_OBJECT
public:
    FKFileSender(QObject *parent = 0);
    ~FKFileSender();
    static void setFileMap(QMap<QString,QString> fileMap);
public slots:
    void getNextBlock(QVariant vfile);
    void interruptUploading(QString file);
signals:
    void reply(QVariant re);
private:
    QVariant nextBlock(QString file);
    QVariant newFile(QString file);
    QVariant endFile(QString file);
    QVariant error(QString file, QString message);
    QMap<QString,qint64> _lastBlockPosition;
    static QMap<QString,QString> _fileMap;
    static QMap<QString,QFile*> _opened;
    static QMap<QString,int> _streamers;
};

#endif // FKFILESENDER_H
